package easy;

public class Solution_1189 {

    public int maxNumberOfBalloons(String text) {
        int[] arr = new int[26];
        char[] chars = text.toCharArray();
        for (char c : chars) {
            arr[c - 'a']++;
        }
        int a = Math.min(arr[0], arr[1]);
        int b = Math.min(arr[11] / 2, arr[13]);
        int c = Math.min(a, b);
        int d = Math.min(c, arr[14] / 2);
        return d;
    }

    public static void main(String[] args) {
        Solution_1189 model = new Solution_1189();
        System.out.println(model.maxNumberOfBalloons("nlaebolko"));
        System.out.println(model.maxNumberOfBalloons("loonbalxballpoon"));
    }
}
